<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>TwinIOC-API代码示例-自定义主题</title>

    <link rel="stylesheet" href="../css/common.css" />
    <script src="../public/tgapp/TGApp.min.js"></script>
    <script src="../js/TwinIOCApp.min.js"></script>
    <script src="../js/config.js"></script>
    <script src="./index.js"></script>

    <!-- 引入 bootstrap -->
    <link rel="stylesheet" href="../css/bootstrap.min.css" />
    <script src="../lib/bootstrap.bundle.min.js"></script>

    <!-- 引入 echarts -->
    <script src="../lib/echarts.min.js"></script>

    <style>
      ::selection {
        background: transparent !important;
      }

      /* 场景加载loading start */
      #mask {
        display: none;
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        left: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 10;
        color: #ccc;
        font-size: 16px;
      }

      .avw-loader section {
        line-height: 1;
      }
      /* 场景加载loading end */

      /* 左侧面板 start */
      .left-panel-container,
      .right-panel-container {
        position: absolute;
        top: 10%;
        left: 10px;
        display: none;
        background: rgba(12, 12, 20, 0.85);
        width: 338px;
        height: calc(100% - 252px);
        color: #fff;
        /* overflow-y: auto; */
      }
      .card {
        height: 100%;
        border: 0;
        border-radius: 0;
      }
      .left-panel-container .card-header {
        padding: 0;
      }
      .left-panel-container .card-body {
        padding: 0;
        background-color: rgba(12, 12, 20, 0.85);
        height: 100%;
        overflow-y: auto;
      }

      .left-panel-container .list-group .list-group-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
      }

      .left-panel-container .accordion-header {
        position: relative;
      }
      .left-panel-container .accordion-header .all-checkbox {
        position: absolute;
        top: -5px;
        right: 40px;
        z-index: 1000;
      }
      /* 左侧面板 end */

      /* tab栏切换 start */
      .left-panel-container .card-header .nav {
        position: unset;
        transform: none;
      }
      .nav-tabs {
        justify-content: space-between;
        border-radius: 0;
        border: 0;
        background-color: #16161d;
      }
      .nav-tabs .nav-item {
        flex: 1;
      }
      .nav-tabs .nav-item button {
        width: 100%;
      }
      .nav-tabs .nav-item .nav-link {
        color: #fff;
        border-radius: 0;
        border: 1px solid #42424f;
      }
      .nav-tabs .nav-item .nav-link.active {
        color: aqua;
        background-color: #16161d;
      }
      .nav-tabs .nav-item .nav-link:hover {
        background-color: #285aac;
      }
      /* tab栏切换 end */

      /* 右侧面板 start */
      .right-panel-container {
        right: 10px;
        left: auto;
      }
      .right-panel-container .card {
        background: rgba(12, 12, 20, 0.85);
      }
      .right-panel-container .card .card-header {
        height: 46px;
        line-height: 46px;
        background: #16161d;
        border: 1px solid #42424f;
        border-radius: 0;
        color: #fff;
        padding: 0 10px;
      }

      .right-panel-container .card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
      }
      .right-panel-container .card-header .title-name {
        font-size: 16px;
        color: #fff;
        font-weight: bold;
      }
      .right-panel-container .card-header .btn-reset {
        margin-left: 150px;
        font-size: 12px;
        cursor: pointer;
      }
      .right-panel-container .card-header .btn-close {
        font-size: 12px;
      }
      .right-panel-container .card-body {
        padding: 0;
      }
      .right-panel-container .chart-container {
        height: 300px;
        width: 100%;
        padding: 10px;
      }
      .right-panel-container .chart-container .chart-box {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        border: 1px solid #4E4E5C;
        border-radius: 10px;
      }
      /* 右侧面板 end */
    </style>
  </head>

  <body>
    <div class="app" id="app">
      <!-- 头部 -->
      <div class="header-wrap">
        <a href="//www.twinioc.net" target="_blank">TwinIOC</a><span>-API代码示例-自定义主题</span><br />
        <span class="ctrl">显示图层图表管理列表-点击设置图层显隐及显示图表详情</span>
        <!-- <img src="../../image/tuguan.png" /> -->
      </div>

      <div id="mask">
        <!-- 加载Loding -->
        <div class="avw-loader">
          <section><span class="loader-112">L &nbsp; ading </span></section>
        </div>

        <!-- 进度条dom暂时不能删除，twinioc.js 会获取这个dom进行设置进度条 删除时会报错 -->
        <div class="progress-wrap" style="opacity: 0">
          <p>场景加载中...</p>
          <div class="bar-outer">
            <div class="bar-inner"></div>
          </div>
          <p class="value"></p>
        </div>
      </div>

      <!-- 场景 -->
      <div id="container"></div>

      <!-- 左侧功能面板 -->
      <div class="left-panel-container">
        <div class="card">
          <div class="card-header">
            <ul class="nav nav-tabs" id="myTab" role="tablist">
              <li class="nav-item" role="presentation">
                <button
                  class="nav-link active"
                  id="overlay-tab"
                  data-bs-toggle="tab"
                  data-bs-target="#overlay-tab-pane"
                  type="button"
                  role="tab"
                  aria-controls="overlay-tab-pane"
                  aria-selected="true"
                  onclick="onLeftPanelTitleClick('overlay')"
                >
                  图层管理
                </button>
              </li>
              <li class="nav-item" role="presentation">
                <button
                  class="nav-link"
                  id="chart-tab"
                  data-bs-toggle="tab"
                  data-bs-target="#chart-tab-pane"
                  type="button"
                  role="tab"
                  aria-controls="chart-tab-pane"
                  aria-selected="false"
                  onclick="onLeftPanelTitleClick('chart')"
                >
                  图表管理
                </button>
              </li>
            </ul>
          </div>
          <div class="card-body">
            <div class="tab-content" id="myTabContent">
              <div class="tab-pane fade show active" id="overlay-tab-pane" role="tabpanel" aria-labelledby="overlay-tab" tabindex="0">
                <!-- 图层面板 -->
                <div class="accordion left-panel overlay" id="overlayAccordion"></div>
              </div>
              <div class="tab-pane fade" id="chart-tab-pane" role="tabpanel" aria-labelledby="chart-tab" tabindex="0">
                <!-- 图表面板 -->
                <div class="accordion left-panel chart" id="chartAccordion"></div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div class="right-panel-container">
        <div class="card analysis">
          <!-- 标题 -->
          <div class="card-header text-primary">
            <div class="title-name">图表标题</div>
            <!-- 关闭按钮 -->
            <button type="button" class="btn-close btn-close-white" onclick="closeRightPanel()"></button>
          </div>
          <div class="card-body">
            <!-- 显示的图表 -->
            <div class="chart-container">
              <div class="chart-box" id="chart-box"></div>
            </div>
          </div>
        </div>
      </div>

      <!-- 底部 -->
      <div class="footer-box">
        <span>基于孪易数字孪生应用开发引擎构建 https://www.twinioc.net</span>
        <span>版权所有 北京数字冰雹信息技术股份有限公司</span>
      </div>
    </div>
  </body>
</html>
<style>
  html,
  body {
    background-color: #00000000;
  }
</style>
